#ifndef __SENSORS_READ_H__
#define __SENSORS_READ_H__

#include <xqueue.h>
#include <xtask.h>
#include <rrcon.h>

namespace control_test {
    using namespace kthrobot;

    typedef XQueue<ADCRawData> SensorsDataQueue;

    class SensorsReader : public XTask {
    public:
        SensorsReader();
        virtual ~SensorsReader();

        void TaskCode();

        SensorsDataQueue* get_queue() { return &data_queue_; }

        static int ConvertToCm(int value, int type);

    private:
        SensorsDataQueue data_queue_;
        static int ir_calibration_function_(int V, int k, int m_prime, int b_prime);
    };
};

#endif // __SENSORS_READ_H__
